Skip to content

Fix FlxUITypedButton.hx Compatibility#296

Closed
KELOTOMU wants to merge 1 commit into
HaxeFlixel:devfrom
KELOTOMU:fix-compatibility
Closed

Fix FlxUITypedButton.hx Compatibility#296
KELOTOMU wants to merge 1 commit into
HaxeFlixel:devfrom
KELOTOMU:fix-compatibility

Conversation

@KELOTOMU

Copy link
Copy Markdown

Fixes compatibility for versions below flixel 5.7.0

flixel.ui.FlxButton status variable used to be an integer and enum flixel.addons.ui.FlxUITypedButton.FlxButtonState doesnt accept int, which makes an error.

Fixes compatibility for versions below flixel 5.7.0
@Geokureli

Geokureli commented Oct 13, 2025

Copy link
Copy Markdown
Member

Can I get an example snippet that causes the compile error?

@KELOTOMU

Copy link
Copy Markdown
Author

Can I get an example snippet that causes the compile error?

.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: Int should be flixel.addons.ui. FlxButtonState

.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: For function argument 'status'

@Geokureli

Geokureli commented Oct 13, 2025

Copy link
Copy Markdown
Member

Can I get an example snippet that causes the compile error?

.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: Int should be flixel.addons.ui. FlxButtonState

.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: For function argument 'status'

I'm not getting this error when I use FlxUITypedButton, nor is our github coverage. Please provide a code snippet that causes this error. If all you have is a giant project, try creating a new project and using these types until you get the error

@KELOTOMU

Copy link
Copy Markdown
Author

Can I get an example snippet that causes the compile error?

.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: Int should be flixel.addons.ui. FlxButtonState

.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: For function argument 'status'

I'm not getting this error when I use FlxUITypedButton, nor is our github coverage. Please provide a code snippet that causes this error. If all you have is a giant project, try creating a new project and using these types until you get the error

Just use flixel 5.6.X or lower, I don't think you even need to use FlxUITypedButton. This is probably why the github coverage isn't capable of remaking this error. Your fix should be better cause idk how to use cast yet.

@KELOTOMU

Copy link
Copy Markdown
Author

Can I get an example snippet that causes the compile error?

.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: Int should be flixel.addons.ui. FlxButtonState
.haxelib/flixel-ui/2,6,4/flixel/addons/ui/FlxUITypedButton.hx:329: characters 44-50: For function argument 'status'

I'm not getting this error when I use FlxUITypedButton, nor is our github coverage. Please provide a code snippet that causes this error. If all you have is a giant project, try creating a new project and using these types until you get the error

https://gist.github.com/KELOTOMU/e015ce9bf1b812f772b4e22adb81e52e

@KELOTOMU KELOTOMU closed this Oct 14, 2025
@Geokureli

Geokureli commented Oct 14, 2025

Copy link
Copy Markdown
Member

Fixed via: #297
Thanks for the heads up

@KELOTOMU KELOTOMU deleted the fix-compatibility branch October 15, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants